﻿ 

//-------------页面初始化--------------
function initPage()
{
    on_query_user_first_login();  
} 

//查询用户登陆信息
function on_query_user_first_login()
{ 	 
	PostToPHP(__onQueryCallback, "sys_config", "select_user_first_login", "");     
}
function __onQueryCallback(text)
{
	//alert(text); 
	var jsonObj = String2JSON(text);   	
	var ds = GetDataSet(jsonObj);
 	if(jsonObj && ds[0])
    {
		$("user_first_login").value = ds[0]["remark"];
	}
	on_query_Config_sys_info_homepage_msg(); //查询首页滚动信息
} 
//修改用户登陆信息
function onClickEditUserFirstLogin()
{
	var data = "&user_first_login=" + $("user_first_login").value;  
	PostToPHP(__onClickEditUserFirstLoginCallback, "sys_config", "edit_user_first_login", data);
}
function __onClickEditUserFirstLoginCallback(text)
{
	// alert(text); 
	var jsonObj = String2JSON(text);            
	ShowReturnMsg(jsonObj, RePaging);
}  

//----------------首页滚动信息-----------------------
function on_query_Config_sys_info_homepage_msg()
{ 	 
	PostToPHP(__onQueryConfig_sys_info_homepage_msgCallback, "sys_config", "select_Config_sys_info_homepage_msg", "");     
}
function __onQueryConfig_sys_info_homepage_msgCallback(text)
{
	//alert(text); 
	var jsonObj = String2JSON(text);   	
	var ds = GetDataSet(jsonObj);
 	if(jsonObj && ds[0])
    {
		$("Config_sys_info_homepage_msg").value = ds[0]["remark"];
	}
	on_query_Config_sys_register_sex_left_info(); //查询注册-左边滚动信息设置
} 
//修改首页滚动信息
function onClickEditConfig_sys_info_homepage_msg()
{
	var data = "&Config_sys_info_homepage_msg=" + $("Config_sys_info_homepage_msg").value;  
	PostToPHP(__onClickEditConfig_sys_info_homepage_msgCallback, "sys_config", "edit_Config_sys_info_homepage_msg", data);
}
function __onClickEditConfig_sys_info_homepage_msgCallback(text)
{
	// alert(text); 
	var jsonObj = String2JSON(text);            
	ShowReturnMsg(jsonObj, RePaging);
}  


//------------注册-左边滚动信息设置-----------------------
function on_query_Config_sys_register_sex_left_info()
{ 	 
	PostToPHP(__onQueryConfig_sys_register_sex_left_infoCallback, "sys_config", "select_Config_sys_register_sex_left_info", "");     
}
function __onQueryConfig_sys_register_sex_left_infoCallback(text)
{
	//alert(text); 
	var jsonObj = String2JSON(text);   	
	var ds = GetDataSet(jsonObj);
 	if(jsonObj && ds[0])
    {
		$("Config_sys_register_sex_left_info").value = ds[0]["remark"];
	}
} 

//注册-左边滚动信息设置
function onClickEditConfig_sys_register_sex_left_info()
{
	var data = "&Config_sys_register_sex_left_info=" + $("Config_sys_register_sex_left_info").value;  
	PostToPHP(__onClickEditConfig_sys_register_sex_left_infoCallback, "sys_config", "edit_Config_sys_register_sex_left_info", data);
}
function __onClickEditConfig_sys_register_sex_left_infoCallback(text)
{
	//alert(text); 
	var jsonObj = String2JSON(text);            
	ShowReturnMsg(jsonObj, RePaging);
}  

//发送系统管理信息
function onclick_send_sys_info()
{		
	if(confirm("是否发送系统信息?") == false) return;
	var data = "&sys_info_content=" + $("sys_info_content").value;  
	PostToPHP(__onclickEditConfigLevelCallback, "sys_config", "send_sys_info", data);
}
function __onclickEditConfigLevelCallback(text)
{
	//alert(text); 
	var jsonObj = String2JSON(text);            
	ShowReturnMsg(jsonObj, RePaging);
} 